<?php
class father{
     public $a = '';
     public function __construct($num)
     {
          $this->a = $num;
     }
}

class child extends father{
      public function __construct($num)
      {
           $num +=1;
           parent::__construct($num);
      }
}

$father =new father(2);

$child = new child(2);

echo $father->a;
echo $child->a;
